Namespacing everything to /UVa.
[and.git] / UVa / 11296 - Counting Solutions of an Integer Equation / #p11296.cpp#
blobd8d2d2d6b85f9955fccac7c5b488bca8687809b4
1 #include <iostream>
4 int main(){
5   int n;
6   while (cin >> n){
7     long long s=0;
8     if (n % 2 == 1) --n;
9     while (n >= 0){
10       s += (n/2)+1;
11       n -= 2;
12     }
13     cout << s << endl;
14   }
15   
16   return 0;